<template>
  <div class="content">
    <h3>回到顶部示例</h3>
    <p v-for="n in 100" :key="n">段落 {{ n }}</p>
    <el-backtop target=".content" :right="50" :bottom="50">
      <div class="back-top">UP</div>
    </el-backtop>
  </div>
</template>


<script setup>
import { ElBacktop } from 'element-plus';

</script>

<style scoped>

.content {
  height: 100vh;
  overflow-y: auto;
}

.back-top {
  height: 100%;
  width: 100%;
  background-color: #f2f5f6;
  box-shadow: 0 0 6px rgba(0,0,0, .12);
  text-align: center;
  line-height: 40px;
  color: #1989fa;
}


</style>